﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/BackSys.master" AutoEventWireup="true" CodeFile="PunishmentMng.aspx.cs" Inherits="Punishment_PunishmentMng" Title="Untitled Page" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
    <tr>
        <td>
            学号：
        </td>
        <td>
            <asp:TextBox ID="txtStudentID" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            姓名：
        </td>
        <td>
            <asp:TextBox ID="txtStudentName" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            班级：
        </td>
        <td>
            <asp:TextBox ID="txtClass" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            
        </td>
        <td>
            <asp:Button ID="bt_Query" runat="server" Text="查询" onclick="bt_Query_Click" />
        </td>
    </tr>
</table>
<p>
    <asp:GridView ID="GridViewPunishment" runat="server" AllowPaging="true" 
        AutoGenerateColumns="false" AutoGenerateDeleteButton="true"
     AutoGenerateEditButton = "true" DataKeyNames="ID" PageSize="10" 
        onrowdeleting="OnRowDeleting" onrowediting="OnRowEditing">
        <Columns>
            <asp:TemplateField Visible="false">
                <ItemTemplate>
                    <asp:Label ID="lbID" runat="server" Text='<%# Eval("ID")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="学号">
                <ItemTemplate>
                    <asp:Label ID="lbStudentID" runat="server" Text='<%# Eval("StudentID")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="姓名">
                <ItemTemplate>
                    <asp:Label ID="lbName" runat="server" Text='<%# Eval("Name")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="班级">
                <ItemTemplate>
                    <asp:Label ID="lbClass" runat="server" Text='<%# Eval("Class")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
     </asp:GridView>
</p>

<table>
    <tr>
        <td>
            学号：
        </td>
        <td>
            <asp:TextBox ID="txtEditStudentID" runat="server"></asp:TextBox>
        </td>
        <td>
             姓名：
        </td>
        <td>
            <asp:TextBox ID="txtEditName" runat="server"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            添加时间：
        </td>
        <td>
            <asp:TextBox ID="txtAddTime" runat="server"></asp:TextBox>
                <cc1:CalendarExtender ID="CalendarExtender1" runat="server"
                    TargetControlID="txtAddTime" Format="yyyy/MM/dd">
                </cc1:CalendarExtender>
                        <asp:ScriptManager ID="ScriptManager1" runat="server">
                        </asp:ScriptManager>
        </td>
        <td>
            类型：
        </td>
        <td>
            <asp:DropDownList ID="DropDownListType" runat="server">
                <asp:ListItem Value="0">奖励</asp:ListItem>
                <asp:ListItem Value="1">处分</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td>
            内容：
        </td>
        <td>
        </td>
        <td>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td colspan="4">
            <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" MaxLength="500" Height="188px" Width="372px"></asp:TextBox>
        </td>
    </tr>
</table>
<p>
    <asp:Button ID="bt_Add" runat="server" Text="保存" onclick="bt_Add_Click" />
    <asp:Button ID="bt_Cancel" runat="server" Text="取消" onclick="bt_Cancel_Click" />
</p>
<p>
    <asp:Label ID="lbErrorMessage" runat="server" ></asp:Label>
</p>
<p>
    <asp:TextBox ID="txtEditID" runat="server" Visible="false"></asp:TextBox>
</p>
</asp:Content>

